*** Settings ***
Resource          ../Resources_Config.robot

*** Keywords ***
APP发布问题setup
    One APP Login    &{appUser1}[name]    &{appUser1}[pwd]
    #构造请求体
    ${content}    Random Eng    1000    #随机生成长度为100的字符串
    ${imgUrlList}    Create List    &{imgUrlDict}[golf]    &{imgUrlDict}[jetta]
    ${postdata}    Create Dictionary    content=${content}    imgUrlList=${imgUrlList}    mileage=1000    vehicleStyleCode=6    vehicleTypeCode=3
    # 发送请求
    ${response}    Post Request    ${add_question}    ${postdata}
    #校验结果
    Should Be Equal As Strings    ${response["code"]}    ${200}
    Should Be Equal As Strings    ${response["body"]["returnStatus"]}    SUCCEED
    Set Test Variable    ${testQuestionId}    ${response['body']['data']['id']}

web删除问题teardown
    [Arguments]    ${questionId}
    ${params}    Create Dictionary    id    ${questionId}
    ${response}    Delete Request Web    url=${delete_question}    params=${params}
